PeachBrackets
PeachBrackets.DataUri
DataUri.TryDecode(string, string, byte[]) Method
Decodes a data: URI synchronously: percent-decoded first, then base64-decoded when the ;base64 flag is present.
public static bool TryDecode(string? uri, out string mimeType, out byte[] bytes);
Parameters
uri System.String
The URI text.
mimeType System.String
The declared MIME type, or text/plain when the URI declares none.
bytes System.Byte[]
The decoded payload.
Returns
System.Boolean
false when uri is not a well-formed data: URI.